﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//using StockMonitor.Helper;

namespace StockMonitor
{
    public partial class FormClearPos : Form
    {
        public FormClearPos()
        {
            InitializeComponent();
            
        }
        string _stockcode;
        public string Stockcode
        {
            get { return _stockcode; }
            set 
            {
                _stockcode = value;
                this.Text = this.Text + ":"+ _stockcode;
            }
        }
      
        int _amount;

        public int Amount
        {
            get { return _amount; }
            set
            {
                _amount = value;
                this.textBox1.Text = this.Amount.ToString();
            }
        }

        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void btn_ok_Click(object sender, EventArgs e)
        {
            int amount = int.Parse(this.textBox1.Text);
            float price = float.Parse(this.textBox2.Text);


            /*
            var extype = HSCOM.hS.F105查询股票市场(1000, this.Stockcode).First().exchange_type;
            HSCOM.hS.F302委托确认(1000, AuthUserService.Instance.Password, 1000, int.Parse(AuthUserService.Instance.FundAccount), extype, "", this.Stockcode, amount, price, "", "2", "", "");
            */
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
